package cn.clx.ymcc.feign;

import cn.clx.ymcc.doc.CourseDoc;
import cn.clx.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@FeignClient(value = "service-search",fallbackFactory = SearchFeignBallbackFactory.class)
public interface ISearchFeignClient {

    @RequestMapping(value="/search/save",method= RequestMethod.POST)
    public JSONResult saveES(@RequestBody @Valid CourseDoc doc);

    @DeleteMapping("/search/delete")
    public JSONResult deleteES(@RequestParam Long id);
}
